package com.gyx.controller;

import com.gyx.entity.Dept;
import com.gyx.mapper.DeptMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @FileName: DeptController
 * @Description:
 * @Author: GYX
 * @CreateTime: 2024/12/23 15:11
 * @Version: 1.0.0
 */@Controller
@RequestMapping("/dept")
public class DeptController {
       @Autowired
       private DeptMapper deptMapper;

       @RequestMapping("/listJson")
       @ResponseBody
       public List<Dept> listJson(){
           return deptMapper.selectAll();
       }

}
